<template>
  <a-form ref="formRef" :model="form" :rules="rules" layout="vertical">
    <a-row :gutter="20">
      <a-col :span="12">
        <a-form-item name="eqpClassCode">
          <template #label>
            <span>
              设备类型编码
              <a-tooltip v-if="false">
                <template #title></template>
                <QuestionCircleOutlined />
              </a-tooltip>
              <span>：</span>
            </span>
          </template>
          <a-input :disabled="isUpdate" v-model:value="form.eqpClassCode"  allow-clear placeholder="请输入设备类型编码" />
        </a-form-item>
      </a-col>
      <a-col :span="12">
        <a-form-item name="eqpClassName">
          <template #label>
            <span>
              设备类型名称
              <a-tooltip v-if="false">
                <template #title></template>
                <QuestionCircleOutlined />
              </a-tooltip>
              <span>：</span>
            </span>
          </template>
          <a-input v-model:value="form.eqpClassName" allow-clear placeholder="请输入设备类型名称" />
        </a-form-item>
      </a-col>
      <a-col :span="12">
        <a-form-item name="eqpPrecision">
          <template #label>
            <span>
              精度
              <a-tooltip v-if="false">
                <template #title></template>
                <QuestionCircleOutlined />
              </a-tooltip>
              <span>：</span>
            </span>
          </template>
          <a-input v-model:value="form.eqpPrecision" allow-clear placeholder="请输入精度" />
        </a-form-item>
      </a-col>
      <a-col :span="12">
        <a-form-item name="specification">
          <template #label>
            <span>
              型号规格
              <a-tooltip v-if="false">
                <template #title></template>
                <QuestionCircleOutlined />
              </a-tooltip>
              <span>：</span>
            </span>
          </template>
          <a-input v-model:value="form.specification" allow-clear placeholder="请输入型号规格" />
        </a-form-item>
      </a-col>
    </a-row>


  </a-form>
</template>

<script setup name="EquipmentClassForm">
import { reactive, ref } from 'vue';


const props = defineProps({
  // 表单数据
  form: Object,
  isUpdate:false
});

// 验证规则
const rules = reactive({
  eqpClassCode: [{ required: true,  message: '请输入设备类型编码', type: 'string', trigger: 'blur' }],
  eqpClassName: [{ required: true,  message: '请输入设备类型名称', type: 'string', trigger: 'blur' }],
});



defineExpose({
})
</script>

<style></style>
